home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 4 / QRZ Ham Radio Callsign Database - Volume 4.iso / files / arrl / tis / ax25_2.doc < prev    next >
Text File  |  1994-11-27  |  34KB  |  762 lines

  1.  
  2. Subject: 2.3.4.3.3  Frame Reject (FRMR) Response
  3.  
  4. 2.3.4.3.3.1  
  5.      The FRMR response frame is sent to report that the  receiver 
  6. of  a frame cannot successfully process that frame and  that  the 
  7. error condition is not correctable by sending the offending frame 
  8. again.  Typically this condition will appear when a frame without 
  9. an  FCS  error  has  been received  with  one  of  the  following 
  10. conditions:
  11.  
  12.  1.  The  reception of an invalid or not implemented  command  or 
  13.      response frame.
  14.  
  15.  2.  The reception of an I frame whose information field  exceeds 
  16.      the agreed-upon length.  (See 2.4.7.3, below.)
  17.  
  18.  3.  The  reception  of an improper N(R).  This  usually  happens 
  19.      when the N(R) frame has already been sent and  acknowledged, 
  20.      or when N(R) is out of sequence with what was expected.
  21.  
  22.  4.  The reception of a frame with an information field where one 
  23.      is  not  allowed, or the reception of a U or S  frame  whose 
  24.      length is incorrect.  Bits W and Y described in  2.3.4.3.3.2 
  25.      should both be set to one to indicate this condition.
  26.  
  27.       5.  The reception of a supervisory frame with the F bit set 
  28.      to  one,  except  during a  timer  recovery  condition  (see 
  29.      2.4.4.9), or except as a reply to a command frame sent  with 
  30.      the  P  bit  set to one. Bit W  (described  in  2.3.4.3.3.2) 
  31.      should be set to one.
  32.  
  33.  6.  The reception of an unexpected UA or DM response frame.  Bit 
  34.      W should be set to one.
  35.  
  36.  7.  The reception of a frame with an invalid N(S).  Bit W should be
  37.      set to one.
  38.  
  39.         An  invalid N(R) is defined as one which points to  an  I 
  40. frame  that previously has been transmitted and acknowledged,  or 
  41. an  I  frame which has not been transmitted and is not  the  next 
  42. sequential I frame pending transmission.
  43.   
  44.         An  invalid N(S) is defined as an N(S) that is  equal  to 
  45. the  last transmitted N(R)+k and is equal to the  received  state 
  46. variable  V(R),  where  k is the maximum  number  of  outstanding 
  47. information frames as defined in 2.4.7.4 below.
  48.  
  49.         An  invalid  or not implemented command  or  response  is 
  50. defined  as a frame with a control field that is unknown  to  the 
  51. receiver of this frame.
  52.  
  53. 2.3.4.3.3.2  
  54.      When a FRMR frame is sent, an information field is added  to 
  55. the  frame that contains additional information indicating  where 
  56. the  problem  occurred.  This information field is  three  octets 
  57. long and is shown in Fig. 9.
  58.  
  59.                      Information Field Bits
  60.  23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  61.   0  0  0  0  Z  Y  X  W   V(R)    C   V(S)  0  Rejected Frame 
  62.                                    R            Control Field
  63.  
  64.              Fig. 9 -- FRMR frame information field
  65.  
  66.   Where:
  67.  
  68.   1.  The rejected frame control field carries the control  field 
  69.       of  the frame that caused the reject condition.  It  is  in 
  70.       bits 0-7 of the information field.
  71.  
  72.   2.  V(S)  is  the  current send state variable  of  the  device 
  73.       reporting the rejection (bit 9 is the low bit).
  74.  
  75.   3.  The  CR bit is set to zero to indicate the  rejected  frame 
  76.       was a command, or one if it was a response.
  77.  
  78.   4.  V(R)  is the current receive state variable of  the  device 
  79.       reporting rejection (bit 13 is the low bit).
  80.  
  81.   5.  If W is set to 1, the control field received was invalid or 
  82.       not implemented.
  83.  
  84.   6.  If  X  is  set  to 1, the  frame  that  caused  the  reject 
  85.       condition  was considered invalid because it was a U  or  S 
  86.       frame  that had an information field that is  not  allowed.  
  87.       Bit W must be set to 1 in addition to the X bit.
  88.  
  89.   7.  If  Y is set to 1, the control field received and  returned 
  90.       in   bits   exceeded  the  maximum   allowed   under   this 
  91.       recommendation in 2.4.7.3, below.
  92.  
  93.   8.  If  A is set to 1, the control field received and  returned 
  94.       in bits 1 to 8 contained an invalid N(R).
  95.  
  96.   9.  Bits 8, and 20 to 23 are set to 0.
  97.  
  98.  
  99. 2.3.4.3.4  Unnumbered Acknowledge (UA) Response
  100.  
  101.         The  UA  response  frame  is  sent  to  acknowledge   the 
  102. reception  and  acceptance of a SABM or DISC  command  frame.   A 
  103. received command is not actually processed until the UA  response 
  104. frame  is  sent.  Information fields are not permitted  in  a  UA 
  105. frame.
  106.  
  107. 2.3.4.3.5  Disconnected Mode (DM) Response
  108.  
  109.         The  disconnected  mode response is sent whenever  a  DXE 
  110. receives  a  frame  other  than a SABM or UI  frame  while  in  a 
  111. disconnected  mode.   It  is  also sent to  request  a  set  mode 
  112. command,  or  to indicate it cannot accept a  connection  at  the 
  113. moment.  The DM response does not have an information field.
  114.  
  115.         Whenever a SABM frame is a received, and it is determined 
  116. that  a  connection is not possible, a DM frame  shall  be  sent.  
  117. This  will  indicate  that the called  station  cannot  accept  a 
  118. connection at that time.
  119.  
  120.         While a DXE is in the disconnected mode, it will  respond 
  121. to  any command other than a SABM or UI frame with a DM  response 
  122. with the P/F bit set to 1.
  123.  
  124. 2.3.4.3.6  Unnumbered Information (UI) Frame
  125.  
  126.         The   Unnumbered  Information  frame  contains  PID   and 
  127. information fields and is used to pass information along the link 
  128. Ωoutside the normal information controls.  This allows information 
  129. fields  to go back and forth on the link bypassing flow  control.  
  130. Since   these  frames  are  not  acknowledgeable,  if  one   gets 
  131. obliterated, there is no way to recover it.  A received UI  frame 
  132. with  the  P bit set shall cause a response  to  be  transmitted.  
  133. This response shall be a DM frame when in the disconnected  state 
  134. or  a  RR  (or  RNR, if appropriate)  frame  in  the  information 
  135. transfer state.
  136.  
  137. 2.3.5  Link Error Reporting and Recovery
  138.  
  139.         There are several link-layer errors that are  recoverable 
  140. without  terminating the connection.  These error situations  may 
  141. occur  as  a  result  of  malfunctions  within  the  DXE,  or  if 
  142. transmission errors occur.
  143.  
  144. 2.3.5.1  DXE Busy Condition
  145.  
  146.         When  a  DXE  becomes temporarily  unable  to  receive  I 
  147. frames,  such  as when receive buffers are full, it will  send  a 
  148. Receive Not Ready (RNR) frame.  This informs the other DXE   that 
  149. this  DXE  cannot handle any more I frames at the  moment.   This 
  150. condition is usually cleared by the sending of a UA, RR, REJ,  or 
  151. SABM command frame.
  152.  
  153. 2.3.5.2  Send Sequence Number Error
  154.  
  155.         If the send sequence number, N(S), of an otherwise error-
  156. free  received frame does not match the receive  state  variable, 
  157. V(R),  a  send sequence error has occurred, and  the  information 
  158. field will be discarded.  The receiver will not acknowledge  this 
  159. frame, or any other I frames, until N(S) matches V(R).  
  160.  
  161.         The  control  field of the erroneous I frame(s)  will  be 
  162. accepted so that link supervisory functions such as checking  the 
  163. P/F  bit can still be performed.  Because of this  updating,  the 
  164. retransmitted I frame may have an updated P bit and N(R).
  165.  
  166. 2.3.5.3  Reject (REJ) Recovery
  167.  
  168.         REJ  is  used  to request a retransmission  of  I  frames 
  169. following  the  detection  of a N(S) sequence  error.   Only  one 
  170. outstanding  "sent  REJ" condition is allowed at  a  time.   This 
  171. condition  is  cleared  when  the  requested  I  frame  has  been 
  172. received.
  173.  
  174.         A DXE receiving the REJ command will clear the  condition 
  175. by  resending all outstanding I frames (up to the  window  size), 
  176. starting with the one indicated in N(R) of the REJ frame.
  177.  
  178. 2.3.5.4  Time-out Error Recovery
  179.  
  180. 2.3.5.4.1  T1 Timer Recovery
  181.  
  182.         If  a DXE, due to a transmission error, does not  receive 
  183. (or  receives and discards) a single I frame or the last I  frame 
  184. in  a sequence of I frames, it will not detect  a  send-sequence-
  185. number  error,  and therefore will not transmit a REJ.   The  DXE 
  186. which transmitted the unacknowledged I frame(s) shall,  following 
  187. the  completion of time-out period T1, take appropriate  recovery 
  188. action  to determine when I frame retransmission should begin  as 
  189. described  in 2.4.4.9, below.  This condition is cleared  by  the 
  190. reception of an acknowledgement for the sent frame(s), or by  the 
  191. link being reset.  See 2.4.6.
  192.  
  193. 2.3.5.4.2  Timer T3 Recovery
  194.  
  195.         Timer  T3 is used to assure the link is still  functional 
  196. during  periods of low information transfer.  Whenever T1 is  not 
  197. running  (no  outstanding I frames), T3 is used  to  periodically 
  198. poll  the  other DXE of a link.  When T3 times out, a RR  or  RNR 
  199. frame  is transmitted as a command and with the P bit  set.   The 
  200. waiting  acknowledgement  procedure  (2.4.4.9,  below)  is   then 
  201. executed.
  202.  
  203. 2.3.5.5  Invalid Frame or FCS Error
  204.  
  205.         If  an invalid frame is received, or a frame is  received 
  206. with  an FCS error, that frame will be discarded with  no  action 
  207. taken.
  208.  
  209. 2.3.5.6  Frame Rejection Condition
  210.  
  211.         A  frame  rejection condition occurs  when  an  otherwise 
  212. error-free  frame  has been received with one of  the  conditions 
  213. listed in 2.3.4.3.3 above.
  214.  
  215.         Once  a  rejection  error occurs, no more  I  frames  are 
  216. accepted  (except for the examination of the P/F bit)  until  the 
  217. error is resolved.  The error condition is reported to the  other 
  218. DXE by sending a FRMR response frame.  See 2.4.5.
  219.  
  220. 2.4  Description of AX.25 Procedures
  221.  
  222.         The  following  describes the procedures used  to  setup, 
  223. use, and disconnect a balanced link between two DXE stations.
  224.  
  225. 2.4.1  Address Field Operation
  226.  
  227. 2.4.1.1  Address Information
  228.  
  229.         All   transmitted  frames  shall  have   address   fields 
  230. conforming  to  2.2.13, above.  All frames shall  have  both  the 
  231. destination device and the source device addresses in the address 
  232. field,  with the destination address coming first.   This  allows 
  233. many links to share the same RF channel.  The destination address 
  234. is  always  the address of the station(s) to receive  the  frame, 
  235. while the source address contains the address of the device  that 
  236. sent the frame.
  237.  
  238.         The destination address can be a group name or club  call 
  239. sign if the point-to-multipoint operation is allowed.   Operation 
  240. with  destination addresses other than actual amateur call  signs 
  241. is a subject for further study.
  242.  
  243. 2.4.1.2  Command/Response Procedure
  244.  
  245.         AX.25  Version 2.0 has implemented  the  command/response 
  246. information   in  the  address  field.   In  order  to   maintain 
  247. compatibility    with   previous   versions   of    AX.25,    the 
  248. command/response information is conveyed using two bits.
  249.  
  250.         An  upward-compatible AX.25 DXE can determine whether  it 
  251. is  communicating  with  a DXE using an  older  version  of  this 
  252. protocol by testing the command/response bit information  located 
  253. in  bit 7 of the SSID octets of both the destination  and  source 
  254. address subfields.  If both C bits are set to zero, the device is 
  255. using  the  older protocol.  The newer version  of  the  protocol 
  256. always has one of these two bits set to one and the other set  to 
  257. zero, depending on whether the frame is a command or a response.
  258.  
  259.         The  command/response  information is  encoded  into  the 
  260. address field as shown in Fig. 10.
  261.  
  262.   Frame Type          Dest. SSID C-Bit    Source SSID C-Bit
  263.  
  264.   Previous versions             0                    0
  265.   Command (V.2.0)               1                    0
  266.   Response (V.2.0)              0                    1
  267.   Previous versions             1                    1
  268.  
  269.               Fig. 10 -- Command/Response encoding
  270.  
  271.         Since  all  frames  are  considered  either  commands  or 
  272. responses, a device shall always have one of the bits set to one, 
  273. and the other bit set to zero.
  274.  
  275.         The  use  of the command/response  information  in  AX.25 
  276. allows  S frames to be either commands or responses.   This  aids 
  277. maintenance   of  proper  control  over  the  link   during   the 
  278. information transfer state.
  279.  
  280. 2.4.2  P/F Bit Procedures
  281.  
  282.         The next response frame returned by the DXE to a SABM  or 
  283. DISC command with the P bit set to 1 will be a UA or DM  response 
  284. with the F bit set to 1.  
  285.  
  286.         The next response frame returned to an I frame with the P 
  287. bit  set  to 1, received during the information  transfer  state, 
  288. will be a RR, RNR, or REJ response with the F bit set to 1.
  289.  
  290.         The next response frame returned to a supervisory command 
  291. frame  with the P bit set to 1, received during  the  information 
  292. transfer state, will be a RR, RNR, or REJ response frame with the 
  293. F bit set to 1.
  294.  
  295.         The  next  response frame returned to a S  or  I  command 
  296. frame  with  the  P bit set to 1, received  in  the  disconnected 
  297. state, will be a DM response frame with the F bit set to 1.
  298.  
  299.         The  P  bit  is used in  conjunction  with  the  time-out 
  300. recovery condition discussed in 2.3.5.4, above.
  301.  
  302.         When not used, the P/F bit is set to zero.
  303.  
  304. 2.4.3  Procedures For Link Set-Up and Disconnection
  305.  
  306. 2.4.3.1  LAPB Link Connection Establishment
  307.  
  308.         When  one DXE wishes to connect to another DXE,  it  will 
  309. send  a SABM command frame to that device and start  timer  (T1).  
  310. If  the other DXE is there and able to connect, it  will  respond 
  311. with  a UA response frame, and reset both of its  internal  state 
  312. variables  (V(S)  and V(R)).  The reception of  the  UA  response 
  313. frame  at  the  other  end will  cause  the  DXE  requesting  the 
  314. connection  to  cancel the T1 timer and set  its  internal  state 
  315. variables to 0.
  316.  
  317.         If the other DXE doesn't respond before T1 times out, the 
  318. device requesting the connection will re-send the SABM frame, and 
  319. start  T1  running  again.  The DXE should  continue  to  try  to 
  320. establish  a  connection  until it has  tried  unsuccessfully  N2 
  321. times.  N2 is defined in 2.4.7.2, below.
  322.  
  323.         If,  upon  reception of a SABM command, the  DXE  decides 
  324. that  it  cannot enter the indicated state, it should send  a  DM 
  325. frame.
  326.  
  327.         When  receiving a DM response, the DXE sending  the  SABM 
  328. should  cancel  its  T1 timer, and  not  enter  the  information-
  329. transfer state.  
  330.  
  331.         The  DXE sending a SABM command will ignore  and  discard 
  332. any  frames except SABM, DISC, UA, and DM frames from  the  other 
  333. DXE.
  334.  
  335.         Frames  other  than UA and DM in response to  a  received 
  336. SABM  will  be  sent  only after the link is set  up  and  if  no 
  337. outstanding SABM exists.
  338.  
  339. 2.4.3.2  Information-Transfer Phase
  340.  
  341.         After establishing a link connection, the DXE will  enter 
  342. the  information-transfer  state.  In this state,  the  DXE  will 
  343. accept  and  transmit I and S frames according to  the  procedure 
  344. outlined in 2.4.4, below.
  345.  
  346.         When  receiving a SABM command while in the  information-
  347. transfer  state,  the  DXE will follow  the  resetting  procedure 
  348. outlined in 2.4.6 below.
  349.  
  350. 2.4.3.3  Link Disconnection
  351.  
  352. 2.4.3.3.1  
  353.      While  in  the information-transfer state,  either  DXE  may 
  354. indicate a request to disconnect the link by transmitting a  DISC 
  355. command frame and starting timer T1 (see 2.4.7).
  356.  
  357. 2.4.3.3.2  
  358.      A DXE, upon receiving a valid DISC command, shall send a  UA 
  359. response  frame  and enter the disconnected state.  A  DXE,  upon 
  360. receiving  a  UA  or DM response to a sent  DISC  command,  shall 
  361. cancel timer T1, and enter the disconnected state.
  362.  
  363. 2.4.3.3.3  
  364.      If  a UA or DM response is not correctly received before  T1 
  365. times out, the DISC frame should be sent again and T1  restarted.  
  366. If  this happens N2 times, the DXE should enter the  disconnected 
  367. state.
  368.  
  369. 2.4.3.4  Disconnected State
  370.  
  371. 2.4.3.4.1  
  372.      A  DXE  in  the disconnected state  shall  monitor  received 
  373. commands  and react upon the reception of a SABM as described  in 
  374. 2.4.3.1 above and will transmit a DM frame in response to a  DISC 
  375. command.
  376.  
  377. 2.4.3.4.2  
  378.      In the disconnected state, a DXE may initiate a link  set-up 
  379. as outlined in connection establishment above (2.4.3.1).  It  may 
  380. also  respond  to  the  reception  of  a  SABM  and  establish  a 
  381. connection, or it may ignore the SABM and send a DM instead.
  382.  
  383. 2.4.3.4.3  
  384.      Any  DXE receiving a command frame other than a SABM  or  UI 
  385. frame  with the P bit set to one should respond with a  DM  frame 
  386. with  the  F  bit  set to one.  The  offending  frame  should  be 
  387. ignored.
  388.  
  389. 2.4.3.4.4  
  390.      When  the DXE enters the disconnected state after  an  error 
  391. condition  or if an internal error has resulted in the DXE  being 
  392. in  the  disconnected  state, the DXE  should  indicate  this  by 
  393. sending  a  DM response rather than a DISC frame and  follow  the 
  394. link  disconnection procedure outlined in 2.4.3.3.3, above.   The 
  395. DXE  may then try to re-establish the link using the link  set-up 
  396. procedure outlined in 2.4.3.1, above.
  397.  
  398. 2.4.3.5  Collision Recovery
  399.  
  400. 2.4.3.5.1  Collisions in a Half-Duplex Environment
  401.  
  402.         Collisions  of  frames in a half-duplex  environment  are 
  403. taken  care  of  by  the  retry  nature  of  the  T1  timer   and 
  404. retransmission count variable.  No other special action needs  to 
  405. be taken.
  406.  
  407. 2.4.3.5.2  Collisions of Unnumbered Commands
  408.  
  409.         If sent and received SABM or DISC command frames are  the 
  410. same,  both  DXEs  should  send a UA  response  at  the  earliest 
  411. opportunity, and both devices should enter the indicated state.
  412.  
  413.         If sent and received SABM or DISC commands are different, 
  414. both  DXEs should enter the disconnected state and transmit a  DM 
  415. frame at the earliest opportunity.
  416.  
  417. 2.4.3.5.3  Collision of a DM with a SABM or DISC
  418.  
  419.         When  an  unsolicited  DM  response  frame  is  sent,   a 
  420. collision  between it and a SABM or DISC may occur.  In order  to 
  421. prevent  this  DM from being misinterpreted, all  unsolicited  DM 
  422. frames  should  be transmitted with the F bit set to  zero.   All 
  423. SABM  and DISC frames should be sent with the P bit set  to  one.  
  424. This will prevent any confusion when a DM frame is received.
  425.  
  426. 2.4.3.6  Connectionless Operation
  427.  
  428.         In  Amateur  Radio,  there  is  an  additional  type   of 
  429. operation  that is not feasible using level 2 connections.   This 
  430. operation  is  the  round table, where several  amateurs  may  be 
  431. engaged  in one conversation.  This type of operation  cannot  be 
  432. accommodated by AX.25 link-layer connections.
  433.  
  434.         The   way   round-table  activity   is   implemented   is 
  435. technically  outside  the AX.25 connection, but still  using  the 
  436. AX.25 frame structure.
  437.  
  438.         AX.25 uses a special frame for this operation, called the 
  439. Unnumbered  Information (UI) frame.  When this type of  operation 
  440. is  used,  the  destination  address  should  have  a  code  word 
  441. installed  in  it to prevent the users of that  particular  round 
  442. table from seeing all frames going through the shared RF  medium.  
  443. An example of this is if a group of amateurs are in a round-table 
  444. discussion  about  packet  radio, they could put  PACKET  in  the 
  445. destination  address,  so  they would receive  frames  only  from 
  446. others in the same discussion.  An added advantage of the use  of 
  447. AX.25  in this manner is that the source of each frame is in  the 
  448. source  address  subfield,  so  software  could  be  written   to 
  449. automatically display who is making what comments.
  450.  
  451.         Since  this  mode  is connectionless, there  will  be  no 
  452. requests for retransmissions of bad frames.  Collisions will also 
  453. occur, with the potential of losing the frames that collided.
  454.  
  455. 2.4.4  Procedures for Information Transfer
  456.  
  457.         Once  a  connection  has been  established,  as  outlined 
  458. above, both devices are able to accept I, S, and U frames.
  459.  
  460. 2.4.4.1  Sending I Frames
  461.  
  462.         Whenever  a DXE has an I frame to transmit, it will  send 
  463. the  I frame with N(S) of the control field equal to its  current 
  464. send  state  variable V(S).  Once the I frame is sent,  the  send 
  465. state  variable  is  incremented  by one.  If  timer  T1  is  not 
  466. running, it should be started.  If timer T1 is running, it should 
  467. be restarted.
  468.  
  469.         The DXE should not transmit any more I frames if its send 
  470. state variable equals the last received N(R) from the other  side 
  471. of  the link plus seven.  If it were to send more I  frames,  the 
  472. flow control window would be exceed, and errors could result.
  473.  
  474.         If  a  DXE is in a busy condition, it may  still  send  I 
  475. frames as long as the other device is not also busy.
  476.  
  477.         If  a  DXE is in the frame-rejection mode, it  will  stop 
  478. sending I frames.
  479.  
  480. 2.4.4.2  Receiving I Frames
  481.  
  482. 2.4.4.2.1  
  483.      If  a DXE receives a valid I frame (one with a  correct  FCS 
  484. and  whose  send sequence number equals  the  receiver's  receive 
  485. state variable) and is not in the busy condition, it will  accept 
  486. the  received I frame, increment its receive state variable,  and 
  487. act in one of the following manners:
  488.         
  489.  1.  If it has an I frame to send, that I frame may be sent with the
  490.      transmitted N(R) equal to its receive state variable V(R) (thus
  491.      acknowledging the received frame).  Alternately, the device may
  492.      send a RR frame with N(R) equal to V(R), and then send the I 
  493.      frame.
  494.  
  495.  2.  If there are no outstanding I frames, the receiving device will
  496.      send a RR frame with N(R) equal to V(R).  The receiving DXE may
  497.      wait a small period of time before sending the RR frame to be sure
  498.      additional I frames are not being transmitted.
  499.  
  500. 2.4.4.2.2      
  501.      If  the  DXE  is  in a busy condition,  it  may  ignore  any 
  502. received  I  frames without reporting this condition  other  than 
  503. repeating the indication of the busy condition.
  504.  
  505.         If  a busy condition exists, the DXE receiving  the  busy 
  506. condition   indication  should  poll  the  sender  of  the   busy 
  507. indication periodically until the busy condition disappears.  
  508.  
  509.         A  DXE may poll the busy DXE periodically with RR or  RNR 
  510. frames with the P bit set to one.
  511.  
  512.         The  reception  of  I  frames  that  contain  zero-length 
  513. information  fields  shall be reported to the next level  but  no 
  514. information field will be transferred.
  515.  
  516. 2.4.4.3  Reception of Out of Sequence Frames
  517.  
  518.         When  an I frame is received with a correct FCS, but  its 
  519. send sequence number, N(S), does not match the current receiver's 
  520. receive  state  variable, the frame should be discarded.   A  REJ 
  521. frame  shall be sent with a receive sequence number equal to  one 
  522. higher (modulo 8) than the last correctly received I frame if  an 
  523. uncleared  N(S) sequence error condition has not been  previously 
  524. established.   The  received state variable and poll bit  of  the 
  525. discarded  frame should be checked and acted upon, if  necessary, 
  526. before discarding the frame.  
  527.  
  528. 2.4.4.4  Reception of Incorrect Frames
  529.  
  530.         When  a  DXE receives a frame with an incorrect  FCS,  an 
  531. invalid  frame, or a frame with an improper address,  that  frame 
  532. shall be discarded.
  533.  
  534. 2.4.4.5  Receiving Acknowledgement
  535.  
  536.         Whenever an I or S frame is correctly received, even in a 
  537. busy condition, the N(R) of the received frame should be  checked 
  538. to  see if it includes an acknowledgement of outstanding  sent  I 
  539. frames.   The T1 timer should be cancelled if the received  frame 
  540. actually  acknowledges previously unacknowledged frames.  If  the 
  541. T1  timer is cancelled and there are still some frames that  have 
  542. been sent that are not acknowledged, T1 should be started  again.  
  543. If  the T1 timer runs out before an acknowledgement is  received, 
  544. the  device  should proceed to the  retransmission  procedure  in 
  545. 2.4.4.9.
  546.  
  547. 2.4.4.6  Receiving Reject
  548.  
  549.         Upon receiving a REJ frame, the transmitting DXE will set 
  550. its  send  state variable to the same value as  the  REJ  frame's 
  551. received sequence number in the control field.  The DXE will then 
  552. retransmit  any  I  frame(s) outstanding at  the  next  available 
  553. opportunity conforming to the following:
  554.  
  555.  1.  If the DXE is not transmitting at the time, and the  channel 
  556.      is  open,  the  device  may commence  to  retransmit  the  I 
  557.      frame(s) immediately.
  558.  
  559.  2.  If   the   DXE  is  operating  on  a   full-duplex   channel 
  560.      transmitting  a UI or S frame when it receives a REJ  frame, 
  561.      it may finish sending the UI or S frame and then  retransmit 
  562.      the I frame(s).
  563.  
  564.  3.  If   the   DXE  is  operating  in  a   full-duplex   channel 
  565.      transmitting  another I frame when it receives a REJ  frame, 
  566.      it  may  abort  the  I  frame  it  was  sending  and   start 
  567.      retransmission of the requested I frames immediately.
  568.  
  569.  4.  The DXE may send just the one I frame outstanding, or it may 
  570.      send  more than the one indicated if more I frames  followed 
  571.      the  first  one not acknowledged, provided the total  to  be 
  572.      sent does not exceed the flow-control window (7 frames).
  573.  
  574.         If the DXE receives a REJ frame with the poll bit set, it 
  575. should  respond with either a RR or RNR frame with the final  bit 
  576. set before retransmitting the outstanding I frame(s).
  577.  
  578. 2.4.4.7  Receiving a RNR Frame
  579.  
  580.         Whenever  a  DXE  receives a RNR  frame,  it  shall  stop 
  581. transmission  of  I  frames until the  busy  condition  has  been 
  582. cleared.   If timer T1 runs out after the RNR was  received,  the 
  583. waiting  acknowledgement  procedure  listed  in  2.4.4.9,  below, 
  584. should  be  performed.  The poll bit may be used  in  conjunction 
  585. with  S  frames  to test for a change in  the  condition  of  the 
  586. busied-out DXE.
  587.  
  588. 2.4.4.8  Sending a Busy Indication
  589.  
  590.         Whenever a DXE enters a busy condition, it will  indicate 
  591. this  by sending a RNR response at the next  opportunity.   While 
  592. the  DXE is in the busy condition, it may receive and  process  S 
  593. frames,  and if a received S frame has the P bit set to one,  the 
  594. DXE should send a RNR frame with the F bit set to one at the next 
  595. possible  opportunity.   To  clear the busy  condition,  the  DXE 
  596. should  send either a RR or REJ frame with the received  sequence 
  597. number equal to the current receive state variable, depending  on 
  598. whether the last received I frame was properly received or not.
  599.  
  600. 2.4.4.9  Waiting Acknowledgement
  601.  
  602.         If timer T1 runs out waiting the acknowledgement from the 
  603. other DXE for an I frame transmitted, the DXE will restart  timer 
  604. T1  and transmit an appropriate supervisory command frame (RR  or 
  605. RNR)  with  the  P  bit set.  If the  DXE  receives  correctly  a 
  606. supervisory  response frame with the F bit set and with  an  N(R) 
  607. within  the  range from the last N(R) received to the  last  N(S) 
  608. sent  plus  one, the DXE will restart timer T1 and will  set  its 
  609. send  state  variable  V(S) to the received N(R).   It  may  then 
  610. resume   with   I  frame  transmission  or   retransmission,   as 
  611. appropriate.  If, on the other hand, the DXE receives correctly a 
  612. supervisory response frame with the F bit not set, or an I  frame 
  613. or  supervisory command frame, and with an N(R) within the  range 
  614. from  the last N(R) received to the last N(S) sent plus one,  the 
  615. DXE will not restart timer T1, but will use the received N(R)  as 
  616. an  indication of acknowledgement of transmitted I frames  up  to 
  617. and including I frame numbered N(R)-1.
  618.  
  619.         If timer T1 runs out before a supervisory response  frame 
  620. with  the  F  bit set is received, the  DXE  will  retransmit  an 
  621. appropriate supervisory command frame (RR or RNR) with the P  bit 
  622. set.  After N2 attempts to get a supervisory response frame  with 
  623. the  F bit set from the other DXE, the DXE will initiate  a  link 
  624. resetting procedure as described in 2.4.6, below.
  625.  
  626. 2.4.5  Frame Rejection Conditions
  627.  
  628.         A  DXE  shall initiate the frame-reset procedure  when  a 
  629. frame  is received with the correct FCS and address field  during 
  630. the information-transfer state with one or more of the conditions 
  631. in 2.3.4.3.3, above.
  632.  
  633.         Under these conditions, the DXE will ask the other DXE to 
  634. reset  the  link by transmitting a FRMR response as  outlined  in 
  635. 2.4.6.3, below.
  636.  
  637.         After sending the FRMR frame, the sending DXE will  enter 
  638. the  frame reject condition.  This condition is cleared when  the 
  639. DXE that sent the FRMR frame receives a SABM or DISC command,  or 
  640. a DM response frame.  Any other command received while the DXE is 
  641. in the frame reject state will cause another FRMR to be sent  out 
  642. with the same information field as originally sent.
  643.  
  644.         In  the  frame rejection condition, additional  I  frames 
  645. will not be transmitted, and received I frames and S frames  will 
  646. be discarded by the DXE.
  647.  
  648.         The DXE that sent the FRMR frame shall start the T1 timer 
  649. when  the  FRMR is sent.  If no SABM or DISC  frame  is  received 
  650. before the timer runs out, the FRMR frame shall be retransmitted, 
  651. and   the  T1  timer  restarted  as  described  in  the   waiting 
  652. acknowledgement section (2.4.4.9) above.  If the FRMR is sent  N2 
  653. times without success, the link shall be reset.
  654.  
  655. 2.4.6  Resetting Procedure
  656.  
  657. 2.4.6.1  
  658.      The   resetting  procedure  is  used  to   initialize   both 
  659. directions  of  data  flow  after  a  nonrecoverable  error   has 
  660. occurred.   This resetting procedure is used in the  information-
  661. transfer state of an AX.25 link only.
  662.  
  663. 2.4.6.2  
  664.      A DXE shall initiate a reset procedure whenever it  receives 
  665. an unexpected UA response frame or an unsolicited response  frame 
  666. with  the  F bit set to one.  A DXE may also initiate  the  reset 
  667. procedure  upon receipt of a FRMR frame.  Alternatively, the  DXE 
  668. may  respond to a FRMR by terminating the connection with a  DISC 
  669. frame.
  670.  
  671. 2.4.6.3  
  672.      A  DXE  shall  reset the link by sending a  SABM  frame  and 
  673. starting  timer  T1.  Upon receiving a SABM frame  from  the  DXE 
  674. previously connected to, the receiver of a SABM frame should send 
  675. a  UA  frame back at the earliest opportunity, set its  send  and 
  676. receive  state  variables,  V(S) and V(R), to zero  and  stop  T1 
  677. unless it has sent a SABM or DISC itself.  If the UA is correctly 
  678. received by the initial DXE, it resets its send and receive state 
  679. variables, V(S) and V(R), and stops timer T1.  Any busy condition 
  680. that previously existed will also be cleared.
  681.  
  682.         If  a  DM response is received, the DXE  will  enter  the 
  683. disconnected  state  and  stop timer T1.  If timer  T1  runs  out 
  684. before  a UA or DM response frame is received, the SABM  will  be 
  685. retransmitted  and timer T1 restarted.  If timer T1 runs  out  N2 
  686. times,  the  DXE  will  enter the  disconnected  state,  and  any 
  687. previously existing link conditions will be cleared.
  688.  
  689.      Other  commands  or  responses received by  the  DXE  before 
  690. completion of the reset procedure will be discarded.
  691.  
  692. 2.4.6.4  
  693.      One  DXE  may request that the other DXE reset the  link  by 
  694. sending  a  DM response frame.  After the DM frame is  sent,  the 
  695. sending DXE will then enter the disconnected state.
  696.  
  697. 2.4.7  List of System Defined Parameters
  698.  
  699. 2.4.7.1  Timers
  700.  
  701.         To   maintain  the  integrity  of  the  AX.25   level   2 
  702. connection, use of these timers is recommended.
  703.  
  704. 2.4.7.1.1  Acknowledgement Timer T1
  705.  
  706.         The  first timer, T1, is used to make sure a DXE  doesn't 
  707. wait  forever  for a response to a frame it  sends.   This  timer 
  708. cannot be expressed in absolute time, since the time required  to 
  709. send frames varies greatly with the signaling rate used at  level 
  710. 1.   T1  should take at least twice the amount of time  it  would 
  711. take  to send maximum length frame to the other DXE, and get  the 
  712. proper response frame back from the other DXE.  This would  allow 
  713. time for the other DXE to do some processing before responding.
  714.  
  715.         If  level  2 repeaters are to be used, the  value  of  T1 
  716. should be adjusted according to the number of repeaters the frame 
  717. is being transferred through.
  718.  
  719. 2.4.7.1.2  Response Delay Timer T2
  720.  
  721.         The  second timer, T2, may be implemented by the  DXE  to 
  722. specify  a maximum amount of delay to be introduced  between  the 
  723. time an I frame is received, and the time the resulting  response 
  724. frame is sent.  This delay may be introduced to allow a receiving 
  725. DXE to wait a short period of time to determine if there is  more 
  726. than  one frame being sent to it.  If more frames  are  received, 
  727. the  DXE can acknowledge them at once (up to seven), rather  than 
  728. acknowledge  each individual frame.  The use of timer T2  is  not 
  729. mandatory,  but  is recommended to  improve  channel  efficiency.  
  730. Note  that, on full-duplex channels, acknowledgements should  not 
  731. be delayed beyond k/2 frames to achieve maximum throughput.   The 
  732. k parameter is defined in 2.4.7.4, below.
  733.  
  734. 2.4.7.1.3  Inactive Link Timer T3
  735.  
  736.         The third timer, T3, is used whenever T1 isn't running to 
  737. maintain  link integrity.  It is recommended that whenever  there 
  738. are  no  outstanding  unacknowledged I  frames  or  P-bit  frames 
  739. (during  the information-transfer state), a RR or RNR frame  with 
  740. the  P  bit set to one be sent every T3 time units to  query  the 
  741. status  of the other DXE.  The period of T3 is  locally  defined, 
  742. and  depends greatly on level 1 operation.  T3 should be  greater 
  743. than T1, and may be very large on channels of high integrity.
  744.  
  745. 2.4.7.2  Maximum Number of Retries (N2)
  746.  
  747.         The maximum number of retries is used in conjunction with 
  748. the T1 timer.
  749.  
  750. 2.4.7.3  Maximum Number of Octets in an I Field (N1)
  751.  
  752.         The maximum number of octets allowed in the I field  will 
  753. be 256.  There shall also be an integral number of octets.
  754.  
  755. 2.4.7.4  Maximum Number of I Frames Outstanding (k)
  756.  
  757.         The  maximum number of outstanding I frames at a time  is 
  758. seven.
  759.  
  760. END.
  761.  
  762.